package com.xjy.headfirst.工厂模式;

/**
 * decription:
 *
 * @author 辛纪元
 * @since 2022-06-23
 */

public class HaPizzaStore extends PizzaStore{

    @Override
    protected Pizza createPizza(int type) {
        PizzaIngredientFactory pizzaIngredientFactory = new HaPizzaIngredientFactory();
        if (type == 1){
            HaPizza haPizza = new HaPizza(pizzaIngredientFactory);
            haPizza.setName("haPizza");
            return haPizza;
        }
        return null;
    }
}
